package com.jzlin.funhub.admin.model.resp;

import cn.hutool.core.bean.BeanUtil;
import com.jzlin.funhub.admin.model.entity.SysUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 用户明细.
 *
 * @author linjz
 * @since 2025/7/29
 */
@Data
@ApiModel
public class UserDetailResp {
    @ApiModelProperty("用户id")
    private Long id;

    @ApiModelProperty("用户昵称")
    private String nickname;

    @ApiModelProperty("头像")
    private String avatar;

    @ApiModelProperty("个性签名")
    private String signature;

    @ApiModelProperty("发表文章数量")
    private Integer articleCount;

    @ApiModelProperty("文章评论数量")
    private Integer articleCommentCount;

    @ApiModelProperty("文章收藏数量")
    private Integer articleStarCount;

    @ApiModelProperty("提问数量")
    private Integer questionCount;

    @ApiModelProperty("回答数量")
    private Integer questionAnswerCount;

    @ApiModelProperty("问题收藏数量")
    private Integer questionStarCount;

    @ApiModelProperty("关注用户数量")
    private Integer followCount;

    @ApiModelProperty("粉丝数量")
    private Integer followedCount;

    @ApiModelProperty("个人封面")
    private String cover;

    @ApiModelProperty("是否已关注")
    private Boolean hasFollow;

    @ApiModelProperty("是否允许发布文章")
    private Boolean allowBlog;

    public UserDetailResp(SysUser user) {
        BeanUtil.copyProperties(user, this);
    }
}
